# -*- coding: utf-8 -*-


from PyQt5.QtWidgets import QWidget,QApplication
from PyQt5.QtGui import QIcon
import sys

class Icon(QWidget):
    def __init__(self,parent=None):
        super(Icon, self).__init__(parent)
        self.setui()

    def setui(self):
        self.setGeometry(300,500,300,500)   # 长宽高
        self.setWindowTitle("图片")   # 标题
        self.setWindowIcon(QIcon('超萌的吃货蜡.jpg')) # 设置标题图片

if __name__ == '__main__':
    app = QApplication(sys.argv)
    icon = Icon()
    icon.show()
    sys.exit(app.exec_())